<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>编辑图书</title>
    <link rel="stylesheet" th:href="@{/css/style.css}" />
</head>
<body>
<div class="container">
    <h1>编辑图书</h1>

    <form th:action="@{/books/update}" th:object="${book}" method="post">
        <input type="hidden" th:field="*{id}" />

        <div>
            <label for="bookname">书名:</label>
            <input type="text" id="bookname" th:field="*{bookname}" required />
        </div>

        <div>
            <label for="author">作者:</label>
            <input type="text" id="author" th:field="*{author}" required />
        </div>

        <div>
            <input type="submit" value="更新图书" />
            <a href="/books">取消</a>
        </div>
    </form>
</div>
</body>
</html>
